﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.Database;
using Domain;
using Domain.Type;

namespace BusinessTier.DataContext
{
    public class SimplyDataInitializer : DropCreateDatabaseIfModelChanges<SimplyData>
    {
        protected override void Seed(SimplyData context)
        {
            CreateProductTypesList().ForEach(d => context.ProductTypes.Add(d));
            CreatePrintMediaTypesList().ForEach(d => context.PrintMediaTypes.Add(d));
            context.SaveChanges();
            CreatePrintMediaList(context).ForEach(d => context.PrintMedias.Add(d));
            CreateFormFactorList(context).ForEach(d => context.FormFactors.Add(d));
            context.SaveChanges();
       
            CreatePriceList(context).ForEach(d => context.ProductPrices.Add(d));
            CreateNewsList().ForEach(n => context.NewsItems.Add(n));
            CreateSpecialOffersList().ForEach(n => context.SpecialOffers.Add(n));
            
        }


        
        private List<SpecialOffer> CreateSpecialOffersList()
        {
            return new List<SpecialOffer>
            {
                new SpecialOffer{
                    ContentHtml = "ՈՒշադրություն Սիմփլին առաջարկում է ամանօրյա փաթեթ <strong>“Կորպորատիվ շնորհավորանքներ”</strong>: 50 էքսկլյուզիվ դիզայնով բացիկներ` <a href=\"/Service/Mail\">Սիմփլի Մեյլ</a> առաքմամբ` ընդամենը 25 000 դրամ, 100 էքսկլյուզիվ դիզայնով բացիկներ` <a href=\"/Service/Mail\">Սիմփլի Մեյլ</a> առաքմամբ` ընդամենը 45 000 դրամ...",
                    LangCode = "hy",
                    Subject="Կորպորատիվ Շնորհավորանքներ",
                    StartDate = new DateTime(2010,12,1,9,0,0),
                    EndDate = new DateTime(2010,12,31,19,0,0),
                    CreateDate = DateTime.Now,
                    IsApproved = true,
                    EndDateString = "մինչև դեկտեմբերի 31ը"

                },
                new SpecialOffer{
                    ContentHtml = "Ամանորյա գովազդային համալիր փաթեթ <em>/Էքսկյուզիվ դիզայնով 2011 սեղանի օրացույց, բուկլետ, ամանորյա բացիկ/</em>` <a href=\"/Service/Mail\">Սիմփլի Մեյլ</a> առաքմամբ, 50 հատ` 55000 դրամ, 100 հատ` 100 000 դրամ",
                    LangCode = "hy",
                    Subject="Համալիր Փաթեթներ",
                    StartDate = new DateTime(2010,12,1,9,0,0),
                    EndDate = new DateTime(2010,12,31,19,0,0),
                    CreateDate = DateTime.Now,
                    IsApproved = true,
                    EndDateString = "մինչև դեկտեմբերի 31ը"

                },

                new SpecialOffer{
                    ContentHtml = "Внимание! <strong>Симпли Принт</strong> предлагает новогодний пакет <strong>\"Корпоративные Поздравления\"</strong>. 50 открыток с эксклюзивным дизайном с доставкой <a href=\"/Service/Mail\">Симпли Мейл</a> всего 25 000 драм, 100 открыток с эксклюзивным дизайном с доставкой <a href=\"/Service/Mail\">Симпли Мейл</a> всего 45 000 драм...",
                    LangCode = "ru",
                    Subject="Корпоративные Поздравления 2011",
                    StartDate = new DateTime(2010,12,1,9,0,0),
                    EndDate = new DateTime(2010,12,31,19,0,0),
                    CreateDate = DateTime.Now,
                    IsApproved = true,
                    EndDateString = "до 31-го декабря"

                },
                new SpecialOffer{
                    ContentHtml = "Новогодний рекламный комплексный пакет <em>/Эксклюзивные дизайнерские - Настольный календарь 2011, буклет, новогодняя открытка/</em> с доставкой <a href=\"/Service/Mail\">Симпли Мейл</a>, 50 штук 55000 драм, 100 штук` 100 000 драм",
                    LangCode = "ru",
                    Subject="Комплексный Пакет 2011",
                    StartDate = new DateTime(2010,12,1,9,0,0),
                    EndDate = new DateTime(2010,12,31,19,0,0),
                    CreateDate = DateTime.Now,
                    IsApproved = true,
                    EndDateString = "до 31-го декабря"

                },
            };
        }

        private List<NewsItem> CreateNewsList()
        {
            return new List<NewsItem>
            {
                new NewsItem{Subject = "Դիջիտեք Էքսպո 2010",
                             BodyHtml = "<p>Հատուկ <a href=\"http://www.digitec.am\" >Դիջիտեք Էքսպո 2010</a>-ի շրջանակներում <strong>Simply Print</strong>-ը բոլոր մասնակից կազմակերպություններին տրամադրում է <strong style=\"color=#FF0000\">15%</strong> զեղչ գովազդային բոլոր նյութերի պատրաստման համար</p>",
                             LangCode = "hy",
                             IsApproved = true,
                             CreateDate = new DateTime(2010,10,20,9,0,0)
                            
                },
                new NewsItem{Subject = "Digitec Expo 2010",
                             BodyHtml = "<p>Специально в рамках экспо <a href=\"http://www.digitec.am\" >Digitec 2010</a> <strong>Simply Print</strong> прелагает всем участвующим организациям <strong style=\"color=#FF0000\">15%</strong> скидку на изготовление всех видов реклам продукции</p>",
                             LangCode = "ru",
                             IsApproved = true,
                             CreateDate = new DateTime(2010,10,20,9,0,0)
                            
                },
                new NewsItem{Subject = "Digitec Expo 2010",
                             BodyHtml = "<p>We're happy to announce that <strong>Simply Print</strong> specially for <a href=\"http://www.digitec.am\" >Digitec Expo 2010</a> participating companies offers <strong style=\"color=#FF0000\">15%</strong> off for all kinds of printing products</p>",
                             LangCode = "en",
                             IsApproved = true,
                             CreateDate = new DateTime(2010,10,20,9,0,0)
                            
                },

                new NewsItem{Subject = "Simply Mail - Պարզ Նամակ",
                             BodyHtml = "<p>Սիմփլի տպագրությունը տեղեկացնում է նոր ծառայություն մեկնարկի մասին: <a href=\"/Service/Mail\">Սիմփլի Մեյլ</a> ծառայության շնորհիվ այսուհետ ձեր պատվիրած տպագրական նյութերը կառաքվեն ձեր գործընկերներին, հաճախորդներին ինչպես նաև հարազատներին <a href=\"/Services/Mail\">մանրամասն...</a></p>",
                             LangCode = "hy",
                             IsApproved = true,
                             CreateDate = new DateTime(2010,11,21,11,0,0)
                            
                },
                
                new NewsItem{Subject = "Simply Mail",
                             BodyHtml = "<p>Simply Print is proud to announce the start of new service... With <a href=\"/Services/Mail\">Simply Mail</a> service from now on your ordered printed materials will be shipped to your partners, customers and also to your friends <a href=\"/Services/Mail\">more...</a></p>",
                             LangCode = "en",
                             IsApproved = true,
                             CreateDate = new DateTime(2010,11,21,11,0,0)
                            
                },
                new NewsItem{Subject = "Simply Mail - Просто Письмо",
                             BodyHtml = "<p>Симпли Принт обьявляет о старте нового сервиса, с помощью сервиса <a href=\"/Services/Mail\">Симпли Почта</a> теперь ваши печатные материалы будут доставленны вашим партнерам, клиентам или просто дорогим вам людям <a href=\"/Services/Mail\">подробнее...</a></p>",
                             LangCode = "ru",
                             IsApproved = true,
                             CreateDate = new DateTime(2010,11,21,11,0,0)
                            
                },
            };
        }

        private List<ProductPrice> CreatePriceList(SimplyData ctx)
        {
            var sheet = ctx.ProductTypes.Find(ProductTypeCode.SHEET_PRINTING);
            var a3Poster = ctx.ProductTypes.Find(ProductTypeCode.A3_POSTER);
            var banner = ctx.ProductTypes.Find(ProductTypeCode.BANNER);
            var blank = ctx.ProductTypes.Find(ProductTypeCode.BLANK);
            var booklet = ctx.ProductTypes.Find(ProductTypeCode.BOOKLET);
            var brochure = ctx.ProductTypes.Find(ProductTypeCode.BROCHURE);
            var businessCard = ctx.ProductTypes.Find(ProductTypeCode.BUSINESS_CARD);
            var calendar = ctx.ProductTypes.Find(ProductTypeCode.CALENDAR);
            var envelope = ctx.ProductTypes.Find(ProductTypeCode.ENVELOPE);
            var flyer = ctx.ProductTypes.Find(ProductTypeCode.FLYER);
            var folder = ctx.ProductTypes.Find(ProductTypeCode.FOLDER);
            var invitation = ctx.ProductTypes.Find(ProductTypeCode.INVITATION);
            

            var standardPaper = ctx.PrintMedias.Find("NC090G");


            var a4sheetFormFactor = ctx.FormFactors.Find(1);
            

            var priceList = new List<ProductPrice>
            {
                new ProductPrice{Quantity = 1,
                                Price4x0 = 300,
                                Price4x4 = 590,
                                Price1x0 = 150,
                                Price1x1 = 290,
                                Price4x1 = 450,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                                
                },

                new ProductPrice{Quantity = 5,
                                Price4x0 = 260,
                                Price4x4 = 480,
                                Price1x0 = 130,
                                Price1x1 = 240,
                                Price4x1 = 390,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 10,
                                Price4x0 = 240,
                                Price4x4 = 420,
                                Price1x0 = 120,
                                Price1x1 = 210,
                                Price4x1 = 360,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 20,
                                Price4x0 = 210,
                                Price4x4 = 380,
                                Price1x0 = 105,
                                Price1x1 = 180,
                                Price4x1 = 315,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 40,
                                Price4x0 = 185,
                                Price4x4 = 315,
                                Price1x0 = 90,
                                Price1x1 = 154,
                                Price4x1 = 275,
                               // ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 70,
                                Price4x0 = 155,
                                Price4x4 = 270,
                                Price1x0 = 80,
                                Price1x1 = 126,
                                Price4x1 = 235,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 100,
                                Price4x0 = 140,
                                Price4x4 = 240,
                                Price1x0 = 73,
                                Price1x1 = 118,
                                Price4x1 = 213,
                               // ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 150,
                                Price4x0 = 125,
                                Price4x4 = 220,
                                Price1x0 = 65,
                                Price1x1 = 104,
                                Price4x1 = 190,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 200,
                                Price4x0 = 115,
                                Price4x4 = 210,
                                Price1x0 = 59,
                                Price1x1 = 96,
                                Price4x1 = 174,
                               // ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 250,
                                Price4x0 = 110,
                                Price4x4 = 190,
                                Price1x0 = 55,
                                Price1x1 = 90,
                                Price4x1 = 165,
                               // ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 300,
                                Price4x0 = 105,
                                Price4x4 = 175,
                                Price1x0 = 52,
                                Price1x1 = 86,
                                Price4x1 = 157,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = true,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 500,
                                Price4x0 = 94,
                                Price4x4 = 150,
                                Price1x0 = 45,
                                Price1x1 = 76,
                                Price4x1 = 139,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 750,
                                Price4x0 = 80,
                                Price4x4 = 140,
                                Price1x0 = 40,
                                Price1x1 = 70,
                                Price4x1 = 120,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },

                new ProductPrice{Quantity = 1000,
                                Price4x0 = 70,
                                Price4x4 = 135,
                                Price1x0 = 38,
                                Price1x1 = 65,
                                Price4x1 = 108,
                                //ProductType = sheet,
                                DefaultPrintMedia = standardPaper,
                                DefaultDisplay = false,
                                FormFactor = a4sheetFormFactor
                },
            };
            return priceList;
        }

        private List<PrintMedia> CreatePrintMediaList(SimplyData ctx)
        {
            var plainPaperType = ctx.PrintMediaTypes.Find(MediaTypeCode.PLAIN_PAPER);
            var adhesiveType = ctx.PrintMediaTypes.Find(MediaTypeCode.ADHESIVE);
            var decorativeType = ctx.PrintMediaTypes.Find(MediaTypeCode.DECORATIVE_PAPER);
            var transparentType = ctx.PrintMediaTypes.Find(MediaTypeCode.TRANSPARENT_FILM);
            var envelopeType = ctx.PrintMediaTypes.Find(MediaTypeCode.ENVELOPE);
            var pergamentType = ctx.PrintMediaTypes.Find(MediaTypeCode.PERGAMENT);
            


            var medias = new List<PrintMedia>
            {
                new PrintMedia{PrintMediaCode = "NC090G",
                                NameEn = "Coated Glossy 90gr",
                                NameRu = "Coated Glossy 90gr",
                                NameAm = "Coated Glossy 90gr",
                                Price = 6,
                                PrintMediaType = plainPaperType,
                                Weight = 90,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "NC090M",
                    NameEn = "Coated Mate 90gr",
                                NameRu = "Coated Mate 90gr",
                                NameAm = "Coated Mate 90gr",
                                Price = 6,
                                PrintMediaType = plainPaperType,
                                Weight = 90,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "NC115G",
                    NameEn = "Coated Glossy 115gr",
                                NameRu = "Coated Glossy 115gr",
                                NameAm = "Coated Glossy 115gr",
                                Price = 8,
                                PrintMediaType = plainPaperType,
                                Weight = 115,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "NC115M",
                    NameEn = "Coated Mate 115gr",
                                NameRu = "Coated Mate 115gr",
                                NameAm = "Coated Mate 115gr",
                                Price = 8,
                                PrintMediaType = plainPaperType,
                                Weight = 115,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "NC170M",
                    NameEn = "Coated Mate 170gr",
                                NameRu = "Coated Mate 170gr",
                                NameAm = "Coated Mate 170gr",
                                Price = 11,
                                PrintMediaType = plainPaperType,
                                Weight = 170,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "NC170G",
                    NameEn = "Coated Glossy 170gr",
                                NameRu = "Coated Glossy 170gr",
                                NameAm = "Coated Glossy 170gr",
                                Price = 11,
                                PrintMediaType = plainPaperType,
                                Weight = 170,
                                SizeISO = "A4"
                },
                 new PrintMedia{PrintMediaCode = "NC200M",
                    NameEn = "Coated Mate 200gr",
                                 NameRu = "Coated Mate 200gr",
                                 NameAm = "Coated Mate 200gr",
                                Price = 13,
                                PrintMediaType = plainPaperType,
                                Weight = 200,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "NC200G",
                    NameEn = "Coated Glossy 200gr",
                                NameRu = "Coated Glossy 200gr",
                                NameAm = "Coated Glossy 200gr",
                                Price = 13,
                                PrintMediaType = plainPaperType,
                                Weight = 200,
                                SizeISO = "A4"
                },

                new PrintMedia{PrintMediaCode = "BR200M",
                    NameEn = "Board Mate 200gr",
                                NameRu = "Board Mate 200gr",
                                NameAm = "Board Mate 200gr",
                                Price = 16,
                                PrintMediaType = plainPaperType,
                                Weight = 200,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "BR260M",
                    NameEn = "Board Mate 260gr",
                                NameRu = "Board Mate 260gr",
                                NameAm = "Board Mate 260gr",
                                Price = 21,
                                PrintMediaType = plainPaperType,
                                Weight = 200,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "XC080M",
                    NameEn = "Xerox Colotech+ 80gr",
                                NameRu = "Xerox Colotech+ 80gr",
                                NameAm = "Xerox Colotech+ 80gr",
                                Price = 4,
                                PrintMediaType = plainPaperType,
                                Weight = 80,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "XC120G",
                    NameEn = "Xerox Colotech+ Gloss 120gr",
                                NameRu = "Xerox Colotech+ Gloss 120gr",
                                NameAm = "Xerox Colotech+ Gloss 120gr",
                                Price = 14,
                                PrintMediaType = plainPaperType,
                                Weight = 120,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "XC160M",
                    NameEn = "Xerox Colotech+ Mate 160gr",
                                NameRu = "Xerox Colotech+ Mate 160gr",
                                NameAm = "Xerox Colotech+ Mate 160gr",
                                Price = 16,
                                PrintMediaType = plainPaperType,
                                Weight = 160,
                                SizeISO = "A4"
                },

                new PrintMedia{PrintMediaCode = "XC170G",
                    NameEn = "Xerox Colotech+ Gloss 170gr",
                                NameRu = "Xerox Colotech+ Gloss 170gr",
                                NameAm = "Xerox Colotech+ Gloss 170gr",
                                Price = 18,
                                PrintMediaType = plainPaperType,
                                Weight = 170,
                                SizeISO = "A4"
                },

                new PrintMedia{PrintMediaCode = "XC200G",
                    NameEn = "Xerox Colotech+ Gloss 200gr",
                                NameRu = "Xerox Colotech+ Gloss 200gr",
                                NameAm = "Xerox Colotech+ Gloss 200gr",
                                Price = 26,
                                PrintMediaType = plainPaperType,
                                Weight = 200,
                                SizeISO = "A4"
                },

                new PrintMedia{PrintMediaCode = "XC250G",
                    NameEn = "Xerox Colotech+ Gloss 250gr",
                                NameRu = "Xerox Colotech+ Gloss 250gr",
                                NameAm = "Xerox Colotech+ Gloss 250gr",
                                Price = 32,
                                PrintMediaType = plainPaperType,
                                Weight = 250,
                                SizeISO = "A4"
                },

                new PrintMedia{PrintMediaCode = "XC280G",
                    NameEn = "Xerox Colotech+ Gloss 280gr",
                                NameRu = "Xerox Colotech+ Gloss 280gr",
                                NameAm = "Xerox Colotech+ Gloss 280gr",
                                Price = 35,
                                PrintMediaType = plainPaperType,
                                Weight = 280,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "XC300M",
                    NameEn = "Xerox Colotech+ Gloss 300gr",
                                NameRu = "Xerox Colotech+ Mate 300gr",
                                NameAm = "Xerox Colotech+ Gloss 300gr",
                                Price = 40,
                                PrintMediaType = plainPaperType,
                                Weight = 300,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "EVA4ST",
                    NameEn = "A4 envelope",
                                NameRu = "A4 envelope",
                                NameAm = "A4 envelope",
                                Price = 30,
                                PrintMediaType = envelopeType,
                                Weight = 0,
                                SizeISO = "C4"
                },
                new PrintMedia{PrintMediaCode = "EVA5ST",
                    NameEn = "A5 envelope",
                                NameRu = "A5 envelope",
                                NameAm = "A5 envelope",
                                Price = 15,
                                PrintMediaType = envelopeType,
                                Weight = 0,
                                SizeISO = "C5"
                },
                new PrintMedia{PrintMediaCode = "EVEUST",
                    NameEn = "Euro envelope",
                               NameRu = "Euro envelope",
                               NameAm = "Euro envelope",
                                Price = 7,
                                PrintMediaType = envelopeType,
                                Weight = 0,
                                SizeISO = "DL"

                },
                new PrintMedia{PrintMediaCode = "LB33ST",
                    NameEn = "Adhesive label 33x",
                               NameRu = "Adhesive label 33x",
                               NameAm = "Adhesive label 33x",
                                Price = 60,
                                PrintMediaType = adhesiveType,
                                Weight = 0,
                                SizeISO = "A4"
                },
               new PrintMedia{PrintMediaCode = "LB24ST",
                    NameEn = "Adhesive label 24x",
                               NameRu = "Adhesive label 24x",
                               NameAm = "Adhesive label 24x",
                                Price = 60,
                                PrintMediaType = adhesiveType,
                                Weight = 0,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "LB16ST",
                    NameEn = "Adhesive label 16x",
                               NameRu = "Adhesive label 16x",
                               NameAm = "Adhesive label 16x",
                                Price = 60,
                                PrintMediaType = adhesiveType,
                                Weight = 0,
                                SizeISO = "A4"
                },
                new PrintMedia{PrintMediaCode = "LB12ST",
                    NameEn = "Adhesive label 12x",
                               NameRu = "Adhesive label 12x",
                               NameAm = "Adhesive label 12x",
                                Price = 60,
                                PrintMediaType = adhesiveType,
                                Weight = 0,
                                SizeISO = "A4"
                },
            };
            return medias;
        }

        private List<PrintMediaType> CreatePrintMediaTypesList()
        {
            var mediaTypes = new List<PrintMediaType>
            {
                new PrintMediaType{PrintMediaTypeId = MediaTypeCode.PLAIN_PAPER,
                                    NameEn = "Plain paper",
                                    NameRu = "Обычная бумага",
                                    NameAm = "Հասարակ թուղթ"
                },

                new PrintMediaType{PrintMediaTypeId = MediaTypeCode.DECORATIVE_PAPER,
                                    NameEn = "Decorative paper",
                                    NameRu = "Декоративная бумага",
                                    NameAm = "Դեկորատիվ թուղթ"
                },


                new PrintMediaType{PrintMediaTypeId = MediaTypeCode.ENVELOPE,
                                    NameEn = "Envelope",
                                    NameRu = "Конверт",
                                    NameAm = "Ծրար"
                },


                new PrintMediaType{PrintMediaTypeId = MediaTypeCode.ADHESIVE,
                                    NameEn = "Adhesive",
                                    NameRu = "Самоклейка",
                                    NameAm = "Ինքնակպչուն"
                },

                new PrintMediaType{PrintMediaTypeId = MediaTypeCode.PERGAMENT,
                                    NameEn = "Pergament",
                                    NameRu = "Пергамент",
                                    NameAm = "Պերգամենտ"
                },

                new PrintMediaType{PrintMediaTypeId = MediaTypeCode.TRANSPARENT_FILM,
                                    NameEn = "Transparent film",
                                    NameRu = "Прозрачная пленка",
                                    NameAm = "Թափանցիկ"
                },
            };

            return mediaTypes;
        }

        private List<ProductType> CreateProductTypesList()
        {
            var productTypes = new List<ProductType>
            {
                new ProductType{ProductTypeId = ProductTypeCode.SHEET_PRINTING,
                              NameEn = "Sheet printing",
                              NameAm = "Էջային տպգր.",
                              NameRu = "Листовая печать",
                              IsEndProduct = false,
                              SortKey = 1,
                              DoubleSideOption = 0,
                },

                new ProductType{ProductTypeId = ProductTypeCode.A3_POSTER,
                              NameEn = "A3 poster",
                              NameAm = "A3 պաստառ",
                              NameRu = "А3 постер",
                              IsEndProduct = true,
                              SortKey = 4,
                              DoubleSideOption = -1,
                },

                new ProductType{ProductTypeId = ProductTypeCode.BANNER,
                              NameEn = "Banner",
                              NameAm = "Բաներ",
                              NameRu = "Баннер",
                              IsEndProduct = true,
                              SortKey = 5,
                              DoubleSideOption = 0,
                },

                new ProductType{ProductTypeId = ProductTypeCode.BLANK,
                              NameEn = "Blank",
                              NameAm = "Բլանկ",
                              NameRu = "Бланк",
                              IsEndProduct = true,
                              SortKey = 6,
                              DoubleSideOption = 0,
                },

                new ProductType{ProductTypeId = ProductTypeCode.BOOKLET,
                              NameEn = "Booklet",
                              NameAm = "Բուկլետ",
                              NameRu = "Буклет",
                              IsEndProduct = true,
                              SortKey = 7,
                              DoubleSideOption = 1,
                },

                new ProductType{ProductTypeId = ProductTypeCode.BROCHURE,
                              NameEn = "Brochure",
                              NameAm = "Բրոշյուր",
                              NameRu = "Брошюра",
                              IsEndProduct = true,
                              SortKey = 8,
                              DoubleSideOption = 1,
                },
                
                new ProductType{ProductTypeId = ProductTypeCode.BUSINESS_CARD,
                              NameEn = "Business card",
                              NameAm = "Այցեքարտ",
                              NameRu = "Визитка",
                              IsEndProduct = true,
                              SortKey = 9,
                              DoubleSideOption = 0,
                },

                new ProductType{ProductTypeId = ProductTypeCode.CALENDAR,
                              NameEn = "Calendar",
                              NameAm = "Օրացույց",
                              NameRu = "Календарь",
                              IsEndProduct = true,
                              SortKey = 10,
                              DoubleSideOption = 1,
                },

                new ProductType{ProductTypeId = ProductTypeCode.ENVELOPE,
                              NameEn = "Envelope",
                              NameAm = "Ծրար",
                              NameRu = "Конверт",
                              IsEndProduct = true,
                              SortKey = 11,
                              DoubleSideOption = 0,
                },

                new ProductType{ProductTypeId = ProductTypeCode.FLYER,
                              NameEn = "Flyer",
                              NameAm = "Ֆլայեր",
                              NameRu = "Флаер",
                              IsEndProduct = true,
                              SortKey = 12,
                },

                new ProductType{ProductTypeId = ProductTypeCode.FOLDER,
                              NameEn = "Folder",
                              NameAm = "Թղթապանակ",
                              NameRu = "Папка",
                              IsEndProduct = true,
                              SortKey = 13,
                              DoubleSideOption = 0,
                },

                new ProductType{ProductTypeId = ProductTypeCode.INVITATION,
                              NameEn = "Invitation",
                              NameAm = "Հրավիրատոմս",
                              NameRu = "Приглашение",
                              IsEndProduct = true,
                              SortKey = 14,
                              DoubleSideOption = 0,
                },
                new ProductType{ProductTypeId = ProductTypeCode.GREETING_CARD,
                              NameEn = "Greeting card",
                              NameAm = "Բացիկ",
                              NameRu = "Открытка",
                              IsEndProduct = true,
                              SortKey = 16,
                              DoubleSideOption = 0,
                },
                new ProductType{ProductTypeId = ProductTypeCode.CD_BOX,
                              NameEn = "CD/DVD",
                              NameAm = "CD/DVD",
                              NameRu = "CD/DVD",
                              IsEndProduct = true,
                              SortKey = 15,
                              DoubleSideOption = 1,
                },
                new ProductType{ProductTypeId = ProductTypeCode.LABEL,
                              NameEn = "Label",
                              NameAm = "Պիտակ",
                              NameRu = "Лейбл",
                              IsEndProduct = true,
                              SortKey = 16,
                              DoubleSideOption = -1,
                },
            };
            return productTypes;
        }

        private List<FormFactor> CreateFormFactorList(SimplyData ctx)
        {
            var sheet = ctx.ProductTypes.Find(ProductTypeCode.SHEET_PRINTING);
            
            var a3Poster = ctx.ProductTypes.Find(ProductTypeCode.A3_POSTER);
            var banner = ctx.ProductTypes.Find(ProductTypeCode.BANNER);
            var blank = ctx.ProductTypes.Find(ProductTypeCode.BLANK);
            var booklet = ctx.ProductTypes.Find(ProductTypeCode.BOOKLET);
            var brochure = ctx.ProductTypes.Find(ProductTypeCode.BROCHURE);
            var businessCard = ctx.ProductTypes.Find(ProductTypeCode.BUSINESS_CARD);
            var calendar = ctx.ProductTypes.Find(ProductTypeCode.CALENDAR);
            var envelope = ctx.ProductTypes.Find(ProductTypeCode.ENVELOPE);
            var flyer = ctx.ProductTypes.Find(ProductTypeCode.FLYER);
            var folder = ctx.ProductTypes.Find(ProductTypeCode.FOLDER);
            var invitation = ctx.ProductTypes.Find(ProductTypeCode.INVITATION);
            var greetings = ctx.ProductTypes.Find(ProductTypeCode.GREETING_CARD);
            var labels = ctx.ProductTypes.Find(ProductTypeCode.LABEL);
            var cdbox = ctx.ProductTypes.Find(ProductTypeCode.CD_BOX);

            return new List<FormFactor>
            {
                /********************
                 * A4 Form Factor*/
                //1
                new FormFactor{
                   NameEn = "A4",
                   NameAm = "A4",
                   NameRu = "A4",
                   Product = sheet,
                   Width = 210,
                   Height = 297,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //2
                new FormFactor{
                   NameEn = "A3",
                   NameAm = "A3",
                   NameRu = "A3",
                   Product = sheet,
                   Width = 297,
                   Height = 420,
                   CountInA4 =0.5,
                   CreateDate = DateTime.Now
                },

              
                //3
                new FormFactor{
                   NameEn = "SRA3",
                   NameAm = "SRA3",
                   NameRu = "SRA3",
                   Product = sheet,
                   Width = 320,
                   Height = 450,
                   CountInA4 =0.476,
                   CreateDate = DateTime.Now
                },
                
                /*********************
                 * Classic flyer
                 * */
                //4
                new FormFactor{
                   NameEn = "classic",
                   NameAm = "classic",
                   NameRu = "classic",
                   Product = flyer,
                   Width = 95,
                   Height = 200,
                   CountInA4 =3,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },

                /*************
                 * A3
                 * */
                //5
                new FormFactor{
                   NameEn = "A4",
                   NameAm = "A4",
                   NameRu = "A4",
                   Product = envelope,
                   Width = 220,
                   Height = 310,
                   CountInA4 =1,
                   CreateDate = DateTime.Now
                },
                //6
                new FormFactor{
                   NameEn = "A3",
                   NameAm = "A3",
                   NameRu = "A3",
                   Product = a3Poster,
                   Width = 287,
                   Height = 410,
                   CountInA4 =0.5,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //7
                new FormFactor{
                   NameEn = "banner",
                   NameAm = "banner",
                   NameRu = "banner",
                   Product = banner,
                   Width = 310,
                   Height = 1000,
                   CountInA4 =0.2,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //8
                new FormFactor{
                   NameEn = "1/3 A4",
                   NameAm = "1/3 A4",
                   NameRu = "1/3 A4",
                   Product = booklet,
                   Width = 287,
                   Height = 200,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //9
                new FormFactor{
                   NameEn = "A5/8p",
                   NameAm = "A5/8p",
                   NameRu = "A5/8p",
                   Product = brochure,
                   Width = 194,
                   Height = 200,
                   CountInA4 =0.5,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //10
                new FormFactor{
                   NameEn = "int",
                   NameAm = "int",
                   NameRu = "int",
                   Product = businessCard,
                   Width = 90,
                   Height = 50,
                   CountInA4 =10,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //11
                new FormFactor{
                   NameEn = "euro",
                   NameAm = "euro",
                   NameRu = "euro",
                   Product = businessCard,
                   Width = 85,
                   Height = 55,
                   CountInA4 =10,
                   CreateDate = DateTime.Now
                },
                //12
                new FormFactor{
                   NameEn = "long",
                   NameAm = "long",
                   NameRu = "long",
                   Product = businessCard,
                   Width = 100,
                   Height = 50,
                   CountInA4 =10,
                   CreateDate = DateTime.Now
                },
                //13
                new FormFactor{
                   NameEn = "pyramid",
                   NameAm = "pyramid",
                   NameRu = "pyramid",
                   Product = calendar,
                   Width = 210,
                   Height = 110,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },

                //14
                new FormFactor{
                   NameEn = "pyramid+",
                   NameAm = "pyramid+",
                   NameRu = "pyramid+",
                   Product = calendar,
                   Width = 210,
                   Height = 110,
                   CountInA4 =1,
                   CreateDate = DateTime.Now
                },
                //15
                new FormFactor{
                   NameEn = "A5",
                   NameAm = "A5",
                   NameRu = "A5",
                   Product = envelope,
                   Width = 162,
                   Height = 229,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //16
                new FormFactor{
                   NameEn = "euro",
                   NameAm = "euro",
                   NameRu = "euro",
                   Product = envelope,
                   Width = 228,
                   Height = 115,
                   CountInA4 =1,
                   CreateDate = DateTime.Now
                },
                //17
                new FormFactor{
                   NameEn = "A4",
                   NameAm = "A4",
                   NameRu = "A4",
                   Product = folder,
                   Width = 200,
                   Height = 287,
                   CountInA4 =1.5,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //18
                new FormFactor{
                   NameEn = "A4 roll",
                   NameAm = "A4 roll",
                   NameRu = "A4 roll",
                   Product = invitation,
                   Width = 200,
                   Height = 287,
                   CountInA4 =1.5,
                   CreateDate = DateTime.Now,
                   HasPergament = true,
                   IsDefault = true
                },

                //19
                new FormFactor{
                   NameEn = "33 up",
                   NameAm = "33 up",
                   NameRu = "33 up",
                   Product = labels,
                   Width = 210,
                   Height = 297,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                },
                //20
                new FormFactor{
                   NameEn = "24 up",
                   NameAm = "24 up",
                   NameRu = "24 up",
                   Product = labels,
                   Width = 210,
                   Height = 297,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                },
                //21
                new FormFactor{
                   NameEn = "16 up",
                   NameAm = "16 up",
                   NameRu = "16 up",
                   Product = labels,
                   Width = 210,
                   Height = 297,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                },
                //22
                new FormFactor{
                   NameEn = "12 up",
                   NameAm = "12 up",
                   NameRu = "12 up",
                   Product = labels,
                   Width = 210,
                   Height = 297,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //23
                 new FormFactor{
                   NameEn = "A4",
                   NameAm = "A4",
                   NameRu = "A4",
                   Product = blank,
                   Width = 210,
                   Height = 297,
                   CountInA4 =1,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },

                //24
                 new FormFactor{
                   NameEn = "simple",
                   NameAm = "simple",
                   NameRu = "simple",
                   Product = cdbox,
                   Width = 120,
                   Height = 120,
                   CountInA4 =0.5,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
                //25
                new FormFactor{
                   NameEn = "simple",
                   NameAm = "simple",
                   NameRu = "simple",
                   Product = greetings,
                   Width = 100,
                   Height = 200,
                   CountInA4 =2,
                   CreateDate = DateTime.Now,
                   IsDefault = true
                },
            };
        }
    }
    
}
